package cn.gson.school.entity.zhaosheng;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 招生模块--学生来源表
 * 来源记录编号；来源方式名称；学生编号
 */
@Entity
@Table(name = "tb_zs_resource")
public class ResourceEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="resource_id")
	private Long resourceId;
	
	@Column(name="resource_name")
	private String resourceName;
	
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "input_student_id")
	private InputStudentEntity inputId;/**学生录入表外键id*/

	public Long getResourceId() {
		return resourceId;
	}

	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}

	public String getResourceName() {
		return resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

	public InputStudentEntity getInputId() {
		return inputId;
	}

	public void setInputId(InputStudentEntity inputId) {
		this.inputId = inputId;
	}

	@Override
	public String toString() {
		return "ResourceEntity [resourceId=" + resourceId + ", resourceName=" + resourceName + ", inputId=" + inputId
				+ "]";
	}
}
